<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from '../components/HelloWorld.vue'
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}

</script>

<template>
 <div class="common-layout">
    <el-container>
     
      <el-container>
        <el-aside width="200px">
           <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose" router
      >
        <el-sub-menu index="1">
          <template #title>
            <el-icon><location /></el-icon>
            <span>爱吃兔溯源</span>
          </template>
       
          <el-menu-item index="basic">
          <el-icon><icon-menu /></el-icon>
          <span>溯源商品管理</span>
        </el-menu-item>
         <el-menu-item index="traceble">
          <el-icon><icon-menu /></el-icon>
          <span>溯源详情管理</span>
        </el-menu-item>
        </el-sub-menu>
       
      </el-menu>

        </el-aside>
        <el-main>
            <RouterView />
        </el-main>
      </el-container>
    </el-container>
  </div>

</template>